.class public Lcom/netease/newsreader/util/HttpUtils;
.super Ljava/lang/Object;
.source "HttpUtils.java"


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 87
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static getDocShortUrl(Ljava/lang/String;Ljava/lang/String;Landroid/content/Context;)Ljava/lang/String;
    .locals 5
    .parameter "_3wor3g"
    .parameter "orgimgurl"
    .parameter "mContext"

    .prologue
    .line 118
    const-string v2, ""

    .line 120
    .local v2, rst:Ljava/lang/String;
    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "http://c.3g.163.com/nc/shorturl/getShort/"

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "/"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, ".html"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    const/16 v4, 0x2710

    invoke-static {v3, v4, p2}, Lcom/netease/newsreader/util/HttpUtils;->getResponseFromGetUrl(Ljava/lang/String;ILandroid/content/Context;)Ljava/lang/String;

    move-result-object v2

    .line 122
    invoke-static {v2}, Lcom/netease/newsreader/util/Tools;->StringToJson(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v1

    .line 124
    .local v1, jsonobj:Lorg/json/JSONObject;
    if-eqz v1, :cond_0

    .line 127
    :try_start_0
    const-string v3, "shortURL"

    invoke-virtual {v1, v3}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v2

    .line 136
    :goto_0
    return-object v2

    .line 128
    :catch_0
    move-exception v0

    .line 129
    .local v0, e:Lorg/json/JSONException;
    move-object v2, p1

    goto :goto_0

    .line 133
    .end local v0           #e:Lorg/json/JSONException;
    :cond_0
    move-object v2, p1

    goto :goto_0
.end method

.method public static getImageShortUrl(Ljava/lang/String;Landroid/content/Context;)Ljava/lang/String;
    .locals 5
    .parameter "orgimgurl"
    .parameter "mContext"

    .prologue
    .line 93
    const-string v2, ""

    .line 95
    .local v2, rst:Ljava/lang/String;
    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "http://c.3g.163.com/nc/shorturl/getMicroBlogImg/"

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, ".html"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    const/16 v4, 0x2710

    invoke-static {v3, v4, p1}, Lcom/netease/newsreader/util/HttpUtils;->getResponseFromGetUrl(Ljava/lang/String;ILandroid/content/Context;)Ljava/lang/String;

    move-result-object v2

    .line 97
    invoke-static {v2}, Lcom/netease/newsreader/util/Tools;->StringToJson(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v1

    .line 99
    .local v1, jsonobj:Lorg/json/JSONObject;
    if-eqz v1, :cond_0

    .line 102
    :try_start_0
    const-string v3, "shortURL"

    invoke-virtual {v1, v3}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v2

    .line 111
    :goto_0
    return-object v2

    .line 103
    :catch_0
    move-exception v0

    .line 104
    .local v0, e:Lorg/json/JSONException;
    move-object v2, p0

    goto :goto_0

    .line 108
    .end local v0           #e:Lorg/json/JSONException;
    :cond_0
    move-object v2, p0

    goto :goto_0
.end method

.method public static getResponseFromGetUrl(Ljava/lang/String;ILandroid/content/Context;)Ljava/lang/String;
    .locals 1
    .parameter "url"
    .parameter "timeout"
    .parameter "mContext"

    .prologue
    .line 231
    invoke-static {p0, p1, p2}, Lcom/netease/newsreader/util/HttpUtils;->getResponseFromGetWithRetry2(Ljava/lang/String;ILandroid/content/Context;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static getResponseFromGetUrl4GBK(Ljava/lang/String;ILandroid/content/Context;)Ljava/lang/String;
    .locals 13
    .parameter "url"
    .parameter "timeout"
    .parameter "mContext"

    .prologue
    .line 293
    new-instance v1, Lorg/apache/http/client/methods/HttpGet;

    invoke-direct {v1, p0}, Lorg/apache/http/client/methods/HttpGet;-><init>(Ljava/lang/String;)V

    .line 294
    .local v1, httpGet:Lorg/apache/http/client/methods/HttpGet;
    const/4 v3, 0x0

    .line 295
    .local v3, httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    const/4 v7, 0x0

    .line 299
    .local v7, resultString:Ljava/lang/String;
    :try_start_0
    new-instance v2, Lorg/apache/http/params/BasicHttpParams;

    invoke-direct {v2}, Lorg/apache/http/params/BasicHttpParams;-><init>()V

    .line 300
    .local v2, httpParameters:Lorg/apache/http/params/HttpParams;
    move v8, p1

    .line 301
    .local v8, timeoutConnection:I
    invoke-static {v2, v8}, Lorg/apache/http/params/HttpConnectionParams;->setConnectionTimeout(Lorg/apache/http/params/HttpParams;I)V

    .line 302
    move v9, p1

    .line 303
    .local v9, timeoutSocket:I
    invoke-static {v2, v9}, Lorg/apache/http/params/HttpConnectionParams;->setSoTimeout(Lorg/apache/http/params/HttpParams;I)V

    .line 304
    const-string v10, "NTES Android"

    invoke-static {v2, v10}, Lorg/apache/http/params/HttpProtocolParams;->setUserAgent(Lorg/apache/http/params/HttpParams;Ljava/lang/String;)V

    .line 305
    new-instance v4, Lorg/apache/http/impl/client/DefaultHttpClient;

    invoke-direct {v4, v2}, Lorg/apache/http/impl/client/DefaultHttpClient;-><init>(Lorg/apache/http/params/HttpParams;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 307
    .end local v3           #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .local v4, httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    :try_start_1
    invoke-static {p2}, Lcom/netease/newsreader/util/Tools;->isCMWAPMobileNet(Landroid/content/Context;)Z

    move-result v10

    if-eqz v10, :cond_0

    .line 308
    new-instance v5, Lorg/apache/http/HttpHost;

    const-string v10, "10.0.0.172"

    const/16 v11, 0x50

    const-string v12, "http"

    invoke-direct {v5, v10, v11, v12}, Lorg/apache/http/HttpHost;-><init>(Ljava/lang/String;ILjava/lang/String;)V

    .line 309
    .local v5, proxy:Lorg/apache/http/HttpHost;
    invoke-virtual {v4}, Lorg/apache/http/impl/client/DefaultHttpClient;->getParams()Lorg/apache/http/params/HttpParams;

    move-result-object v10

    const-string v11, "http.route.default-proxy"

    invoke-interface {v10, v11, v5}, Lorg/apache/http/params/HttpParams;->setParameter(Ljava/lang/String;Ljava/lang/Object;)Lorg/apache/http/params/HttpParams;

    .line 312
    .end local v5           #proxy:Lorg/apache/http/HttpHost;
    :cond_0
    invoke-virtual {v4, v1}, Lorg/apache/http/impl/client/DefaultHttpClient;->execute(Lorg/apache/http/client/methods/HttpUriRequest;)Lorg/apache/http/HttpResponse;

    move-result-object v6

    .line 314
    .local v6, response:Lorg/apache/http/HttpResponse;
    invoke-interface {v6}, Lorg/apache/http/HttpResponse;->getStatusLine()Lorg/apache/http/StatusLine;

    move-result-object v10

    invoke-interface {v10}, Lorg/apache/http/StatusLine;->getStatusCode()I

    move-result v10

    const/16 v11, 0xc8

    if-ne v10, v11, :cond_1

    .line 315
    invoke-interface {v6}, Lorg/apache/http/HttpResponse;->getEntity()Lorg/apache/http/HttpEntity;

    move-result-object v10

    const-string v11, "GBK"

    invoke-static {v10, v11}, Lorg/apache/http/util/EntityUtils;->toString(Lorg/apache/http/HttpEntity;Ljava/lang/String;)Ljava/lang/String;
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    move-result-object v7

    .line 321
    :cond_1
    if-eqz v4, :cond_2

    .line 322
    invoke-virtual {v4}, Lorg/apache/http/impl/client/DefaultHttpClient;->getConnectionManager()Lorg/apache/http/conn/ClientConnectionManager;

    move-result-object v10

    invoke-interface {v10}, Lorg/apache/http/conn/ClientConnectionManager;->shutdown()V

    :cond_2
    move-object v3, v4

    .line 326
    .end local v2           #httpParameters:Lorg/apache/http/params/HttpParams;
    .end local v4           #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .end local v6           #response:Lorg/apache/http/HttpResponse;
    .end local v8           #timeoutConnection:I
    .end local v9           #timeoutSocket:I
    .restart local v3       #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    :cond_3
    :goto_0
    return-object v7

    .line 317
    :catch_0
    move-exception v0

    .line 318
    .local v0, e:Ljava/lang/Exception;
    :goto_1
    const/4 v7, 0x0

    .line 319
    :try_start_2
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    .line 321
    if-eqz v3, :cond_3

    .line 322
    invoke-virtual {v3}, Lorg/apache/http/impl/client/DefaultHttpClient;->getConnectionManager()Lorg/apache/http/conn/ClientConnectionManager;

    move-result-object v10

    invoke-interface {v10}, Lorg/apache/http/conn/ClientConnectionManager;->shutdown()V

    goto :goto_0

    .line 320
    .end local v0           #e:Ljava/lang/Exception;
    :catchall_0
    move-exception v10

    .line 321
    :goto_2
    if-eqz v3, :cond_4

    .line 322
    invoke-virtual {v3}, Lorg/apache/http/impl/client/DefaultHttpClient;->getConnectionManager()Lorg/apache/http/conn/ClientConnectionManager;

    move-result-object v11

    invoke-interface {v11}, Lorg/apache/http/conn/ClientConnectionManager;->shutdown()V

    .line 324
    :cond_4
    throw v10

    .line 320
    .end local v3           #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .restart local v2       #httpParameters:Lorg/apache/http/params/HttpParams;
    .restart local v4       #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .restart local v8       #timeoutConnection:I
    .restart local v9       #timeoutSocket:I
    :catchall_1
    move-exception v10

    move-object v3, v4

    .end local v4           #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .restart local v3       #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    goto :goto_2

    .line 317
    .end local v3           #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .restart local v4       #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    :catch_1
    move-exception v0

    move-object v3, v4

    .end local v4           #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .restart local v3       #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    goto :goto_1
.end method

.method public static getResponseFromGetUrlForPUSH(Ljava/lang/String;ILandroid/content/Context;)Ljava/lang/String;
    .locals 17
    .parameter "url"
    .parameter "timeout"
    .parameter "mContext"

    .prologue
    .line 331
    new-instance v11, Ljava/lang/StringBuffer;

    invoke-direct {v11}, Ljava/lang/StringBuffer;-><init>()V

    .line 332
    .local v11, sb:Ljava/lang/StringBuffer;
    const-string v8, ""

    .line 334
    .local v8, inputLine:Ljava/lang/String;
    const/4 v5, 0x0

    .line 337
    .local v5, httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    :try_start_0
    new-instance v2, Lorg/apache/http/params/BasicHttpParams;

    invoke-direct {v2}, Lorg/apache/http/params/BasicHttpParams;-><init>()V

    .line 338
    .local v2, httpParameters:Lorg/apache/http/params/HttpParams;
    move/from16 v12, p1

    .line 339
    .local v12, timeoutConnection:I
    invoke-static {v2, v12}, Lorg/apache/http/params/HttpConnectionParams;->setConnectionTimeout(Lorg/apache/http/params/HttpParams;I)V

    .line 340
    move/from16 v13, p1

    .line 341
    .local v13, timeoutSocket:I
    invoke-static {v2, v13}, Lorg/apache/http/params/HttpConnectionParams;->setSoTimeout(Lorg/apache/http/params/HttpParams;I)V

    .line 342
    const-string v14, "NTES Android"

    invoke-static {v2, v14}, Lorg/apache/http/params/HttpProtocolParams;->setUserAgent(Lorg/apache/http/params/HttpParams;Ljava/lang/String;)V

    .line 344
    new-instance v6, Lorg/apache/http/impl/client/DefaultHttpClient;

    invoke-direct {v6, v2}, Lorg/apache/http/impl/client/DefaultHttpClient;-><init>(Lorg/apache/http/params/HttpParams;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_1
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    .line 345
    .end local v5           #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .local v6, httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    :try_start_1
    invoke-static/range {p2 .. p2}, Lcom/netease/newsreader/util/Tools;->isCMWAPMobileNet(Landroid/content/Context;)Z

    move-result v14

    if-eqz v14, :cond_0

    .line 346
    new-instance v10, Lorg/apache/http/HttpHost;

    const-string v14, "10.0.0.172"

    const/16 v15, 0x50

    const-string v16, "http"

    move-object/from16 v0, v16

    invoke-direct {v10, v14, v15, v0}, Lorg/apache/http/HttpHost;-><init>(Ljava/lang/String;ILjava/lang/String;)V

    .line 347
    .local v10, proxy:Lorg/apache/http/HttpHost;
    invoke-virtual {v6}, Lorg/apache/http/impl/client/DefaultHttpClient;->getParams()Lorg/apache/http/params/HttpParams;

    move-result-object v14

    const-string v15, "http.route.default-proxy"

    invoke-interface {v14, v15, v10}, Lorg/apache/http/params/HttpParams;->setParameter(Ljava/lang/String;Ljava/lang/Object;)Lorg/apache/http/params/HttpParams;

    .line 350
    .end local v10           #proxy:Lorg/apache/http/HttpHost;
    :cond_0
    new-instance v3, Lorg/apache/http/client/methods/HttpGet;

    move-object/from16 v0, p0

    invoke-direct {v3, v0}, Lorg/apache/http/client/methods/HttpGet;-><init>(Ljava/lang/String;)V

    .line 351
    .local v3, httpRequest:Lorg/apache/http/client/methods/HttpGet;
    invoke-virtual {v6, v3}, Lorg/apache/http/impl/client/DefaultHttpClient;->execute(Lorg/apache/http/client/methods/HttpUriRequest;)Lorg/apache/http/HttpResponse;

    move-result-object v4

    .line 353
    .local v4, httpResponse:Lorg/apache/http/HttpResponse;
    invoke-interface {v4}, Lorg/apache/http/HttpResponse;->getStatusLine()Lorg/apache/http/StatusLine;

    move-result-object v14

    invoke-interface {v14}, Lorg/apache/http/StatusLine;->getStatusCode()I

    move-result v14

    const/16 v15, 0xc8

    if-ne v14, v15, :cond_4

    .line 355
    new-instance v9, Ljava/io/InputStreamReader;

    .line 356
    invoke-interface {v4}, Lorg/apache/http/HttpResponse;->getEntity()Lorg/apache/http/HttpEntity;

    move-result-object v14

    invoke-interface {v14}, Lorg/apache/http/HttpEntity;->getContent()Ljava/io/InputStream;

    move-result-object v14

    .line 355
    invoke-direct {v9, v14}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;)V

    .line 357
    .local v9, is:Ljava/io/InputStreamReader;
    new-instance v7, Ljava/io/BufferedReader;

    invoke-direct {v7, v9}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V

    .line 358
    .local v7, in:Ljava/io/BufferedReader;
    :goto_0
    invoke-virtual {v7}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v8

    if-nez v8, :cond_3

    .line 363
    invoke-virtual {v7}, Ljava/io/BufferedReader;->close()V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    .line 371
    .end local v7           #in:Ljava/io/BufferedReader;
    .end local v9           #is:Ljava/io/InputStreamReader;
    :goto_1
    if-eqz v6, :cond_1

    .line 372
    invoke-virtual {v6}, Lorg/apache/http/impl/client/DefaultHttpClient;->getConnectionManager()Lorg/apache/http/conn/ClientConnectionManager;

    move-result-object v14

    invoke-interface {v14}, Lorg/apache/http/conn/ClientConnectionManager;->shutdown()V

    :cond_1
    move-object v5, v6

    .line 376
    .end local v2           #httpParameters:Lorg/apache/http/params/HttpParams;
    .end local v3           #httpRequest:Lorg/apache/http/client/methods/HttpGet;
    .end local v4           #httpResponse:Lorg/apache/http/HttpResponse;
    .end local v6           #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .end local v12           #timeoutConnection:I
    .end local v13           #timeoutSocket:I
    .restart local v5       #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    :cond_2
    :goto_2
    invoke-virtual {v11}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v14

    return-object v14

    .line 360
    .end local v5           #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .restart local v2       #httpParameters:Lorg/apache/http/params/HttpParams;
    .restart local v3       #httpRequest:Lorg/apache/http/client/methods/HttpGet;
    .restart local v4       #httpResponse:Lorg/apache/http/HttpResponse;
    .restart local v6       #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .restart local v7       #in:Ljava/io/BufferedReader;
    .restart local v9       #is:Ljava/io/InputStreamReader;
    .restart local v12       #timeoutConnection:I
    .restart local v13       #timeoutSocket:I
    :cond_3
    :try_start_2
    invoke-virtual {v11, v8}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0

    goto :goto_0

    .line 368
    .end local v3           #httpRequest:Lorg/apache/http/client/methods/HttpGet;
    .end local v4           #httpResponse:Lorg/apache/http/HttpResponse;
    .end local v7           #in:Ljava/io/BufferedReader;
    .end local v9           #is:Ljava/io/InputStreamReader;
    :catch_0
    move-exception v1

    move-object v5, v6

    .line 369
    .end local v2           #httpParameters:Lorg/apache/http/params/HttpParams;
    .end local v6           #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .end local v12           #timeoutConnection:I
    .end local v13           #timeoutSocket:I
    .local v1, e:Ljava/lang/Exception;
    .restart local v5       #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    :goto_3
    :try_start_3
    const-string v14, "error"

    invoke-virtual {v11, v14}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_1

    .line 371
    if-eqz v5, :cond_2

    .line 372
    invoke-virtual {v5}, Lorg/apache/http/impl/client/DefaultHttpClient;->getConnectionManager()Lorg/apache/http/conn/ClientConnectionManager;

    move-result-object v14

    invoke-interface {v14}, Lorg/apache/http/conn/ClientConnectionManager;->shutdown()V

    goto :goto_2

    .line 366
    .end local v1           #e:Ljava/lang/Exception;
    .end local v5           #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .restart local v2       #httpParameters:Lorg/apache/http/params/HttpParams;
    .restart local v3       #httpRequest:Lorg/apache/http/client/methods/HttpGet;
    .restart local v4       #httpResponse:Lorg/apache/http/HttpResponse;
    .restart local v6       #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .restart local v12       #timeoutConnection:I
    .restart local v13       #timeoutSocket:I
    :cond_4
    :try_start_4
    const-string v14, "error"

    invoke-virtual {v11, v14}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_0

    goto :goto_1

    .line 370
    .end local v3           #httpRequest:Lorg/apache/http/client/methods/HttpGet;
    .end local v4           #httpResponse:Lorg/apache/http/HttpResponse;
    :catchall_0
    move-exception v14

    move-object v5, v6

    .line 371
    .end local v2           #httpParameters:Lorg/apache/http/params/HttpParams;
    .end local v6           #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .end local v12           #timeoutConnection:I
    .end local v13           #timeoutSocket:I
    .restart local v5       #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    :goto_4
    if-eqz v5, :cond_5

    .line 372
    invoke-virtual {v5}, Lorg/apache/http/impl/client/DefaultHttpClient;->getConnectionManager()Lorg/apache/http/conn/ClientConnectionManager;

    move-result-object v15

    invoke-interface {v15}, Lorg/apache/http/conn/ClientConnectionManager;->shutdown()V

    .line 375
    :cond_5
    throw v14

    .line 370
    :catchall_1
    move-exception v14

    goto :goto_4

    .line 368
    :catch_1
    move-exception v1

    goto :goto_3
.end method

.method public static getResponseFromGetUrlX(Ljava/lang/String;ILandroid/content/Context;)Ljava/lang/String;
    .locals 25
    .parameter "url"
    .parameter "timeout"
    .parameter "mContext"

    .prologue
    .line 237
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v16

    .line 239
    .local v16, start:J
    new-instance v15, Ljava/lang/StringBuffer;

    invoke-direct {v15}, Ljava/lang/StringBuffer;-><init>()V

    .line 240
    .local v15, sb:Ljava/lang/StringBuffer;
    const-string v12, ""

    .line 243
    .local v12, inputLine:Ljava/lang/String;
    const/4 v9, 0x0

    .line 247
    .local v9, httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    :try_start_0
    new-instance v7, Lorg/apache/http/client/methods/HttpGet;

    move-object/from16 v0, p0

    invoke-direct {v7, v0}, Lorg/apache/http/client/methods/HttpGet;-><init>(Ljava/lang/String;)V

    .line 249
    .local v7, httpRequest:Lorg/apache/http/client/methods/HttpGet;
    new-instance v6, Lorg/apache/http/params/BasicHttpParams;

    invoke-direct {v6}, Lorg/apache/http/params/BasicHttpParams;-><init>()V

    .line 250
    .local v6, httpParameters:Lorg/apache/http/params/HttpParams;
    move/from16 v18, p1

    .line 251
    .local v18, timeoutConnection:I
    move/from16 v0, v18

    invoke-static {v6, v0}, Lorg/apache/http/params/HttpConnectionParams;->setConnectionTimeout(Lorg/apache/http/params/HttpParams;I)V

    .line 252
    move/from16 v19, p1

    .line 253
    .local v19, timeoutSocket:I
    move/from16 v0, v19

    invoke-static {v6, v0}, Lorg/apache/http/params/HttpConnectionParams;->setSoTimeout(Lorg/apache/http/params/HttpParams;I)V

    .line 255
    const-string v20, "NTES Android"

    move-object/from16 v0, v20

    invoke-static {v6, v0}, Lorg/apache/http/params/HttpProtocolParams;->setUserAgent(Lorg/apache/http/params/HttpParams;Ljava/lang/String;)V

    .line 259
    new-instance v10, Lorg/apache/http/impl/client/DefaultHttpClient;

    invoke-direct {v10, v6}, Lorg/apache/http/impl/client/DefaultHttpClient;-><init>(Lorg/apache/http/params/HttpParams;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    .line 261
    .end local v9           #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .local v10, httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    :try_start_1
    invoke-static/range {p2 .. p2}, Lcom/netease/newsreader/util/Tools;->isCMWAPMobileNet(Landroid/content/Context;)Z

    move-result v20

    if-eqz v20, :cond_0

    .line 262
    new-instance v14, Lorg/apache/http/HttpHost;

    const-string v20, "10.0.0.172"

    const/16 v21, 0x50

    const-string v22, "http"

    move-object/from16 v0, v20

    move/from16 v1, v21

    move-object/from16 v2, v22

    invoke-direct {v14, v0, v1, v2}, Lorg/apache/http/HttpHost;-><init>(Ljava/lang/String;ILjava/lang/String;)V

    .line 263
    .local v14, proxy:Lorg/apache/http/HttpHost;
    invoke-virtual {v10}, Lorg/apache/http/impl/client/DefaultHttpClient;->getParams()Lorg/apache/http/params/HttpParams;

    move-result-object v20

    const-string v21, "http.route.default-proxy"

    move-object/from16 v0, v20

    move-object/from16 v1, v21

    invoke-interface {v0, v1, v14}, Lorg/apache/http/params/HttpParams;->setParameter(Ljava/lang/String;Ljava/lang/Object;)Lorg/apache/http/params/HttpParams;

    .line 265
    .end local v14           #proxy:Lorg/apache/http/HttpHost;
    :cond_0
    invoke-virtual {v10, v7}, Lorg/apache/http/impl/client/DefaultHttpClient;->execute(Lorg/apache/http/client/methods/HttpUriRequest;)Lorg/apache/http/HttpResponse;

    move-result-object v8

    .line 267
    .local v8, httpResponse:Lorg/apache/http/HttpResponse;
    invoke-interface {v8}, Lorg/apache/http/HttpResponse;->getStatusLine()Lorg/apache/http/StatusLine;

    move-result-object v20

    invoke-interface/range {v20 .. v20}, Lorg/apache/http/StatusLine;->getStatusCode()I

    move-result v20

    const/16 v21, 0xc8

    move/from16 v0, v20

    move/from16 v1, v21

    if-ne v0, v1, :cond_1

    .line 269
    new-instance v13, Ljava/io/InputStreamReader;

    .line 270
    invoke-interface {v8}, Lorg/apache/http/HttpResponse;->getEntity()Lorg/apache/http/HttpEntity;

    move-result-object v20

    invoke-interface/range {v20 .. v20}, Lorg/apache/http/HttpEntity;->getContent()Ljava/io/InputStream;

    move-result-object v20

    .line 269
    move-object/from16 v0, v20

    invoke-direct {v13, v0}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;)V

    .line 271
    .local v13, is:Ljava/io/InputStreamReader;
    new-instance v11, Ljava/io/BufferedReader;

    invoke-direct {v11, v13}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V

    .line 272
    .local v11, in:Ljava/io/BufferedReader;
    :goto_0
    invoke-virtual {v11}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v12

    if-nez v12, :cond_3

    .line 277
    invoke-virtual {v11}, Ljava/io/BufferedReader;->close()V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    .line 283
    .end local v11           #in:Ljava/io/BufferedReader;
    .end local v13           #is:Ljava/io/InputStreamReader;
    :cond_1
    if-eqz v10, :cond_2

    .line 284
    invoke-virtual {v10}, Lorg/apache/http/impl/client/DefaultHttpClient;->getConnectionManager()Lorg/apache/http/conn/ClientConnectionManager;

    move-result-object v20

    invoke-interface/range {v20 .. v20}, Lorg/apache/http/conn/ClientConnectionManager;->shutdown()V

    .line 286
    :cond_2
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    .line 287
    .local v4, end:J
    const-string v20, "Timer1"

    new-instance v21, Ljava/lang/StringBuilder;

    invoke-direct/range {v21 .. v21}, Ljava/lang/StringBuilder;-><init>()V

    sub-long v22, v4, v16

    invoke-virtual/range {v21 .. v23}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v21

    invoke-virtual/range {v21 .. v21}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v21

    invoke-static/range {v20 .. v21}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    move-object v9, v10

    .line 289
    .end local v6           #httpParameters:Lorg/apache/http/params/HttpParams;
    .end local v7           #httpRequest:Lorg/apache/http/client/methods/HttpGet;
    .end local v8           #httpResponse:Lorg/apache/http/HttpResponse;
    .end local v10           #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .end local v18           #timeoutConnection:I
    .end local v19           #timeoutSocket:I
    .restart local v9       #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    :goto_1
    invoke-virtual {v15}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v20

    return-object v20

    .line 274
    .end local v4           #end:J
    .end local v9           #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .restart local v6       #httpParameters:Lorg/apache/http/params/HttpParams;
    .restart local v7       #httpRequest:Lorg/apache/http/client/methods/HttpGet;
    .restart local v8       #httpResponse:Lorg/apache/http/HttpResponse;
    .restart local v10       #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .restart local v11       #in:Ljava/io/BufferedReader;
    .restart local v13       #is:Ljava/io/InputStreamReader;
    .restart local v18       #timeoutConnection:I
    .restart local v19       #timeoutSocket:I
    :cond_3
    :try_start_2
    invoke-virtual {v15, v12}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_1
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0

    goto :goto_0

    .line 280
    .end local v8           #httpResponse:Lorg/apache/http/HttpResponse;
    .end local v11           #in:Ljava/io/BufferedReader;
    .end local v13           #is:Ljava/io/InputStreamReader;
    :catch_0
    move-exception v3

    move-object v9, v10

    .line 281
    .end local v6           #httpParameters:Lorg/apache/http/params/HttpParams;
    .end local v7           #httpRequest:Lorg/apache/http/client/methods/HttpGet;
    .end local v10           #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .end local v18           #timeoutConnection:I
    .end local v19           #timeoutSocket:I
    .local v3, e:Ljava/lang/Exception;
    .restart local v9       #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    :goto_2
    :try_start_3
    invoke-virtual {v3}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    .line 283
    if-eqz v9, :cond_4

    .line 284
    invoke-virtual {v9}, Lorg/apache/http/impl/client/DefaultHttpClient;->getConnectionManager()Lorg/apache/http/conn/ClientConnectionManager;

    move-result-object v20

    invoke-interface/range {v20 .. v20}, Lorg/apache/http/conn/ClientConnectionManager;->shutdown()V

    .line 286
    :cond_4
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    .line 287
    .restart local v4       #end:J
    const-string v20, "Timer1"

    new-instance v21, Ljava/lang/StringBuilder;

    invoke-direct/range {v21 .. v21}, Ljava/lang/StringBuilder;-><init>()V

    sub-long v22, v4, v16

    invoke-virtual/range {v21 .. v23}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v21

    invoke-virtual/range {v21 .. v21}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v21

    invoke-static/range {v20 .. v21}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_1

    .line 282
    .end local v3           #e:Ljava/lang/Exception;
    .end local v4           #end:J
    :catchall_0
    move-exception v20

    .line 283
    :goto_3
    if-eqz v9, :cond_5

    .line 284
    invoke-virtual {v9}, Lorg/apache/http/impl/client/DefaultHttpClient;->getConnectionManager()Lorg/apache/http/conn/ClientConnectionManager;

    move-result-object v21

    invoke-interface/range {v21 .. v21}, Lorg/apache/http/conn/ClientConnectionManager;->shutdown()V

    .line 286
    :cond_5
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    .line 287
    .restart local v4       #end:J
    const-string v21, "Timer1"

    new-instance v22, Ljava/lang/StringBuilder;

    invoke-direct/range {v22 .. v22}, Ljava/lang/StringBuilder;-><init>()V

    sub-long v23, v4, v16

    invoke-virtual/range {v22 .. v24}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v22

    invoke-virtual/range {v22 .. v22}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v22

    invoke-static/range {v21 .. v22}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 288
    throw v20

    .line 282
    .end local v4           #end:J
    .end local v9           #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .restart local v6       #httpParameters:Lorg/apache/http/params/HttpParams;
    .restart local v7       #httpRequest:Lorg/apache/http/client/methods/HttpGet;
    .restart local v10       #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .restart local v18       #timeoutConnection:I
    .restart local v19       #timeoutSocket:I
    :catchall_1
    move-exception v20

    move-object v9, v10

    .end local v10           #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    .restart local v9       #httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    goto :goto_3

    .line 280
    .end local v6           #httpParameters:Lorg/apache/http/params/HttpParams;
    .end local v7           #httpRequest:Lorg/apache/http/client/methods/HttpGet;
    .end local v18           #timeoutConnection:I
    .end local v19           #timeoutSocket:I
    :catch_1
    move-exception v3

    goto :goto_2
.end method

.method public static getResponseFromGetWithRetry(Ljava/lang/String;ILandroid/content/Context;)Ljava/lang/String;
    .locals 17
    .parameter "url"
    .parameter "timeout"
    .parameter "mContext"

    .prologue
    .line 435
    new-instance v3, Lorg/apache/commons/httpclient/HttpClient;

    invoke-direct {v3}, Lorg/apache/commons/httpclient/HttpClient;-><init>()V

    .line 436
    .local v3, client:Lorg/apache/commons/httpclient/HttpClient;
    new-instance v8, Lorg/apache/commons/httpclient/methods/GetMethod;

    move-object/from16 v0, p0

    invoke-direct {v8, v0}, Lorg/apache/commons/httpclient/methods/GetMethod;-><init>(Ljava/lang/String;)V

    .line 438
    .local v8, method:Lorg/apache/commons/httpclient/methods/GetMethod;
    invoke-virtual {v3}, Lorg/apache/commons/httpclient/HttpClient;->getHttpConnectionManager()Lorg/apache/commons/httpclient/HttpConnectionManager;

    move-result-object v12

    invoke-interface {v12}, Lorg/apache/commons/httpclient/HttpConnectionManager;->getParams()Lorg/apache/commons/httpclient/params/HttpConnectionManagerParams;

    move-result-object v12

    move/from16 v0, p1

    invoke-virtual {v12, v0}, Lorg/apache/commons/httpclient/params/HttpConnectionManagerParams;->setConnectionTimeout(I)V

    .line 439
    invoke-virtual {v8}, Lorg/apache/commons/httpclient/methods/GetMethod;->getParams()Lorg/apache/commons/httpclient/params/HttpMethodParams;

    move-result-object v12

    const-string v13, "http.socket.timeout"

    invoke-static/range {p1 .. p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v14

    invoke-virtual {v12, v13, v14}, Lorg/apache/commons/httpclient/params/HttpMethodParams;->setParameter(Ljava/lang/String;Ljava/lang/Object;)V

    .line 440
    invoke-virtual {v8}, Lorg/apache/commons/httpclient/methods/GetMethod;->getParams()Lorg/apache/commons/httpclient/params/HttpMethodParams;

    move-result-object v12

    const-string v13, "http.method.retry-handler"

    new-instance v14, Lorg/apache/commons/httpclient/DefaultHttpMethodRetryHandler;

    const/4 v15, 0x2

    const/16 v16, 0x1

    invoke-direct/range {v14 .. v16}, Lorg/apache/commons/httpclient/DefaultHttpMethodRetryHandler;-><init>(IZ)V

    invoke-virtual {v12, v13, v14}, Lorg/apache/commons/httpclient/params/HttpMethodParams;->setParameter(Ljava/lang/String;Ljava/lang/Object;)V

    .line 442
    invoke-static/range {p2 .. p2}, Lcom/netease/newsreader/util/Tools;->isCMWAPMobileNet(Landroid/content/Context;)Z

    move-result v12

    if-eqz v12, :cond_0

    .line 443
    invoke-virtual {v3}, Lorg/apache/commons/httpclient/HttpClient;->getHostConfiguration()Lorg/apache/commons/httpclient/HostConfiguration;

    move-result-object v12

    const-string v13, "10.0.0.172"

    const/16 v14, 0x50

    invoke-virtual {v12, v13, v14}, Lorg/apache/commons/httpclient/HostConfiguration;->setProxy(Ljava/lang/String;I)V

    .line 445
    :cond_0
    invoke-virtual {v8}, Lorg/apache/commons/httpclient/methods/GetMethod;->getParams()Lorg/apache/commons/httpclient/params/HttpMethodParams;

    move-result-object v12

    const-string v13, "http.useragent"

    const-string v14, "NTES Android"

    invoke-virtual {v12, v13, v14}, Lorg/apache/commons/httpclient/params/HttpMethodParams;->setParameter(Ljava/lang/String;Ljava/lang/Object;)V

    .line 446
    const-string v12, "Accept-Encoding"

    const-string v13, "gzip, deflate"

    invoke-virtual {v8, v12, v13}, Lorg/apache/commons/httpclient/methods/GetMethod;->setRequestHeader(Ljava/lang/String;Ljava/lang/String;)V

    .line 449
    :try_start_0
    invoke-virtual {v3, v8}, Lorg/apache/commons/httpclient/HttpClient;->executeMethod(Lorg/apache/commons/httpclient/HttpMethod;)I

    move-result v10

    .line 450
    .local v10, statusCode:I
    const/16 v12, 0xc8

    if-ne v10, v12, :cond_9

    .line 452
    const-string v1, ""

    .line 453
    .local v1, acceptEncoding:Ljava/lang/String;
    const-string v12, "Content-Encoding"

    invoke-virtual {v8, v12}, Lorg/apache/commons/httpclient/methods/GetMethod;->getResponseHeader(Ljava/lang/String;)Lorg/apache/commons/httpclient/Header;

    move-result-object v12

    if-eqz v12, :cond_1

    .line 454
    const-string v12, "Content-Encoding"

    invoke-virtual {v8, v12}, Lorg/apache/commons/httpclient/methods/GetMethod;->getResponseHeader(Ljava/lang/String;)Lorg/apache/commons/httpclient/Header;

    move-result-object v12

    invoke-virtual {v12}, Lorg/apache/commons/httpclient/Header;->getValue()Ljava/lang/String;

    move-result-object v1

    .line 456
    :cond_1
    const-string v12, "getResponseFromGetWithRetry"

    new-instance v13, Ljava/lang/StringBuilder;

    const-string v14, "rst="

    invoke-direct {v13, v14}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v13, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    invoke-static {v12, v13}, Lcom/netease/newsreader/util/Logger;->i(Ljava/lang/String;Ljava/lang/String;)V

    .line 457
    if-eqz v1, :cond_5

    invoke-virtual {v1}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v12

    const-string v13, "gzip"

    invoke-virtual {v12, v13}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v12

    const/4 v13, -0x1

    if-le v12, v13, :cond_5

    .line 458
    invoke-virtual {v8}, Lorg/apache/commons/httpclient/methods/GetMethod;->getResponseBodyAsStream()Ljava/io/InputStream;

    move-result-object v6

    .line 459
    .local v6, is:Ljava/io/InputStream;
    new-instance v4, Ljava/util/zip/GZIPInputStream;

    invoke-direct {v4, v6}, Ljava/util/zip/GZIPInputStream;-><init>(Ljava/io/InputStream;)V

    .line 460
    .local v4, gzin:Ljava/util/zip/GZIPInputStream;
    new-instance v7, Ljava/io/InputStreamReader;

    const-string v12, "utf-8"

    invoke-direct {v7, v4, v12}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/lang/String;)V

    .line 461
    .local v7, isr:Ljava/io/InputStreamReader;
    new-instance v2, Ljava/io/BufferedReader;

    invoke-direct {v2, v7}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V

    .line 462
    .local v2, br:Ljava/io/BufferedReader;
    new-instance v9, Ljava/lang/StringBuffer;

    invoke-direct {v9}, Ljava/lang/StringBuffer;-><init>()V

    .line 464
    .local v9, sb:Ljava/lang/StringBuffer;
    :goto_0
    invoke-virtual {v2}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v11

    .local v11, tempbf:Ljava/lang/String;
    if-nez v11, :cond_3

    .line 467
    invoke-virtual {v7}, Ljava/io/InputStreamReader;->close()V

    .line 468
    invoke-virtual {v4}, Ljava/util/zip/GZIPInputStream;->close()V

    .line 469
    invoke-virtual {v9}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v13

    .line 489
    if-eqz v8, :cond_2

    .line 490
    invoke-virtual {v8}, Lorg/apache/commons/httpclient/methods/GetMethod;->releaseConnection()V

    .line 491
    invoke-virtual {v3}, Lorg/apache/commons/httpclient/HttpClient;->getHttpConnectionManager()Lorg/apache/commons/httpclient/HttpConnectionManager;

    move-result-object v12

    check-cast v12, Lorg/apache/commons/httpclient/SimpleHttpConnectionManager;

    invoke-virtual {v12}, Lorg/apache/commons/httpclient/SimpleHttpConnectionManager;->shutdown()V

    :cond_2
    move-object v12, v13

    .line 496
    .end local v1           #acceptEncoding:Ljava/lang/String;
    .end local v2           #br:Ljava/io/BufferedReader;
    .end local v4           #gzin:Ljava/util/zip/GZIPInputStream;
    .end local v6           #is:Ljava/io/InputStream;
    .end local v7           #isr:Ljava/io/InputStreamReader;
    .end local v9           #sb:Ljava/lang/StringBuffer;
    .end local v10           #statusCode:I
    .end local v11           #tempbf:Ljava/lang/String;
    :goto_1
    return-object v12

    .line 465
    .restart local v1       #acceptEncoding:Ljava/lang/String;
    .restart local v2       #br:Ljava/io/BufferedReader;
    .restart local v4       #gzin:Ljava/util/zip/GZIPInputStream;
    .restart local v6       #is:Ljava/io/InputStream;
    .restart local v7       #isr:Ljava/io/InputStreamReader;
    .restart local v9       #sb:Ljava/lang/StringBuffer;
    .restart local v10       #statusCode:I
    .restart local v11       #tempbf:Ljava/lang/String;
    :cond_3
    :try_start_1
    invoke-virtual {v9, v11}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0

    .line 486
    .end local v1           #acceptEncoding:Ljava/lang/String;
    .end local v2           #br:Ljava/io/BufferedReader;
    .end local v4           #gzin:Ljava/util/zip/GZIPInputStream;
    .end local v6           #is:Ljava/io/InputStream;
    .end local v7           #isr:Ljava/io/InputStreamReader;
    .end local v9           #sb:Ljava/lang/StringBuffer;
    .end local v10           #statusCode:I
    .end local v11           #tempbf:Ljava/lang/String;
    :catch_0
    move-exception v12

    .line 489
    if-eqz v8, :cond_4

    .line 490
    invoke-virtual {v8}, Lorg/apache/commons/httpclient/methods/GetMethod;->releaseConnection()V

    .line 491
    invoke-virtual {v3}, Lorg/apache/commons/httpclient/HttpClient;->getHttpConnectionManager()Lorg/apache/commons/httpclient/HttpConnectionManager;

    move-result-object v12

    check-cast v12, Lorg/apache/commons/httpclient/SimpleHttpConnectionManager;

    invoke-virtual {v12}, Lorg/apache/commons/httpclient/SimpleHttpConnectionManager;->shutdown()V

    .line 496
    :cond_4
    :goto_2
    const-string v12, ""

    goto :goto_1

    .line 471
    .restart local v1       #acceptEncoding:Ljava/lang/String;
    .restart local v10       #statusCode:I
    :cond_5
    :try_start_2
    invoke-virtual {v8}, Lorg/apache/commons/httpclient/methods/GetMethod;->getResponseBodyAsStream()Ljava/io/InputStream;

    move-result-object v6

    .line 472
    .restart local v6       #is:Ljava/io/InputStream;
    new-instance v7, Ljava/io/InputStreamReader;

    const-string v12, "utf-8"

    invoke-direct {v7, v6, v12}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/lang/String;)V

    .line 473
    .restart local v7       #isr:Ljava/io/InputStreamReader;
    new-instance v5, Ljava/io/BufferedReader;

    invoke-direct {v5, v7}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V

    .line 474
    .local v5, in:Ljava/io/BufferedReader;
    new-instance v9, Ljava/lang/StringBuffer;

    invoke-direct {v9}, Ljava/lang/StringBuffer;-><init>()V

    .line 476
    .restart local v9       #sb:Ljava/lang/StringBuffer;
    :goto_3
    invoke-virtual {v5}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v11

    .restart local v11       #tempbf:Ljava/lang/String;
    if-nez v11, :cond_7

    .line 480
    invoke-virtual {v7}, Ljava/io/InputStreamReader;->close()V

    .line 481
    invoke-virtual {v9}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0

    move-result-object v13

    .line 489
    if-eqz v8, :cond_6

    .line 490
    invoke-virtual {v8}, Lorg/apache/commons/httpclient/methods/GetMethod;->releaseConnection()V

    .line 491
    invoke-virtual {v3}, Lorg/apache/commons/httpclient/HttpClient;->getHttpConnectionManager()Lorg/apache/commons/httpclient/HttpConnectionManager;

    move-result-object v12

    check-cast v12, Lorg/apache/commons/httpclient/SimpleHttpConnectionManager;

    invoke-virtual {v12}, Lorg/apache/commons/httpclient/SimpleHttpConnectionManager;->shutdown()V

    :cond_6
    move-object v12, v13

    .line 481
    goto :goto_1

    .line 478
    :cond_7
    :try_start_3
    invoke-virtual {v9, v11}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_0

    goto :goto_3

    .line 488
    .end local v1           #acceptEncoding:Ljava/lang/String;
    .end local v5           #in:Ljava/io/BufferedReader;
    .end local v6           #is:Ljava/io/InputStream;
    .end local v7           #isr:Ljava/io/InputStreamReader;
    .end local v9           #sb:Ljava/lang/StringBuffer;
    .end local v10           #statusCode:I
    .end local v11           #tempbf:Ljava/lang/String;
    :catchall_0
    move-exception v12

    move-object v13, v12

    .line 489
    if-eqz v8, :cond_8

    .line 490
    invoke-virtual {v8}, Lorg/apache/commons/httpclient/methods/GetMethod;->releaseConnection()V

    .line 491
    invoke-virtual {v3}, Lorg/apache/commons/httpclient/HttpClient;->getHttpConnectionManager()Lorg/apache/commons/httpclient/HttpConnectionManager;

    move-result-object v12

    check-cast v12, Lorg/apache/commons/httpclient/SimpleHttpConnectionManager;

    invoke-virtual {v12}, Lorg/apache/commons/httpclient/SimpleHttpConnectionManager;->shutdown()V

    .line 494
    :cond_8
    throw v13

    .line 489
    .restart local v10       #statusCode:I
    :cond_9
    if-eqz v8, :cond_4

    .line 490
    invoke-virtual {v8}, Lorg/apache/commons/httpclient/methods/GetMethod;->releaseConnection()V

    .line 491
    invoke-virtual {v3}, Lorg/apache/commons/httpclient/HttpClient;->getHttpConnectionManager()Lorg/apache/commons/httpclient/HttpConnectionManager;

    move-result-object v12

    check-cast v12, Lorg/apache/commons/httpclient/SimpleHttpConnectionManager;

    invoke-virtual {v12}, Lorg/apache/commons/httpclient/SimpleHttpConnectionManager;->shutdown()V

    goto :goto_2
.end method

.method public static getResponseFromGetWithRetry2(Ljava/lang/String;ILandroid/content/Context;)Ljava/lang/String;
    .locals 10
    .parameter "url"
    .parameter "timeout"
    .parameter "mContext"

    .prologue
    .line 502
    const-string v5, ""

    .line 503
    .local v5, responseString:Ljava/lang/String;
    const/4 v3, 0x0

    .line 506
    .local v3, httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    :try_start_0
    new-instance v1, Lorg/apache/http/client/methods/HttpGet;

    invoke-direct {v1, p0}, Lorg/apache/http/client/methods/HttpGet;-><init>(Ljava/lang/String;)V

    .line 507
    .local v1, httpGet:Lorg/apache/http/client/methods/HttpGet;
    new-instance v2, Lorg/apache/http/params/BasicHttpParams;

    invoke-direct {v2}, Lorg/apache/http/params/BasicHttpParams;-><init>()V

    .line 509
    .local v2, httpParams:Lorg/apache/http/params/HttpParams;
    invoke-static {v2, p1}, Lorg/apache/http/params/HttpConnectionParams;->setConnectionTimeout(Lorg/apache/http/params/HttpParams;I)V

    .line 510
    invoke-static {v2, p1}, Lorg/apache/http/params/HttpConnectionParams;->setSoTimeout(Lorg/apache/http/params/HttpParams;I)V

    .line 511
    const-string v7, "NTES Android"

    invoke-static {v2, v7}, Lorg/apache/http/params/HttpProtocolParams;->setUserAgent(Lorg/apache/http/params/HttpParams;Ljava/lang/String;)V

    .line 513
    invoke-static {v2}, Lcom/netease/newsreader/util/NeteaseHttpClient;->getHttpClient(Lorg/apache/http/params/HttpParams;)Lorg/apache/http/impl/client/DefaultHttpClient;

    move-result-object v3

    .line 514
    invoke-static {p2}, Lcom/netease/newsreader/util/Tools;->isCMWAPMobileNet(Landroid/content/Context;)Z

    move-result v7

    if-eqz v7, :cond_1

    .line 515
    new-instance v4, Lorg/apache/http/HttpHost;

    const-string v7, "10.0.0.172"

    const/16 v8, 0x50

    const-string v9, "http"

    invoke-direct {v4, v7, v8, v9}, Lorg/apache/http/HttpHost;-><init>(Ljava/lang/String;ILjava/lang/String;)V

    .line 516
    .local v4, proxy:Lorg/apache/http/HttpHost;
    invoke-virtual {v3}, Lorg/apache/http/impl/client/DefaultHttpClient;->getParams()Lorg/apache/http/params/HttpParams;

    move-result-object v7

    const-string v8, "http.route.default-proxy"

    invoke-interface {v7, v8, v4}, Lorg/apache/http/params/HttpParams;->setParameter(Ljava/lang/String;Ljava/lang/Object;)Lorg/apache/http/params/HttpParams;

    .line 520
    .end local v4           #proxy:Lorg/apache/http/HttpHost;
    :goto_0
    invoke-static {p2}, Lcom/netease/newsreader/util/NeteaseHttpClient;->initCache(Landroid/content/Context;)V

    .line 536
    invoke-static {v1}, Lcom/netease/newsreader/util/NeteaseHttpClient;->getforCache(Lorg/apache/http/client/methods/HttpGet;)Ljava/lang/String;

    move-result-object v5

    .line 551
    .end local v1           #httpGet:Lorg/apache/http/client/methods/HttpGet;
    .end local v2           #httpParams:Lorg/apache/http/params/HttpParams;
    :cond_0
    :goto_1
    return-object v5

    .line 518
    .restart local v1       #httpGet:Lorg/apache/http/client/methods/HttpGet;
    .restart local v2       #httpParams:Lorg/apache/http/params/HttpParams;
    :cond_1
    invoke-virtual {v3}, Lorg/apache/http/impl/client/DefaultHttpClient;->getParams()Lorg/apache/http/params/HttpParams;

    move-result-object v7

    const-string v8, "http.route.default-proxy"

    invoke-interface {v7, v8}, Lorg/apache/http/params/HttpParams;->removeParameter(Ljava/lang/String;)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 538
    .end local v1           #httpGet:Lorg/apache/http/client/methods/HttpGet;
    .end local v2           #httpParams:Lorg/apache/http/params/HttpParams;
    :catch_0
    move-exception v0

    .line 539
    .local v0, e:Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    .line 540
    const-string v7, "failreason"

    invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v8

    invoke-static {v8}, Lcom/netease/newsreader/util/StringUtil;->valideEventParam(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    invoke-static {p2, v7, v8}, Lcom/netease/mobileanalysis/MobileAgent;->setEvent(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    .line 541
    invoke-static {p2}, Lcom/netease/newsreader/util/Tools;->getNetworkType(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v6

    .line 542
    .local v6, tag:Ljava/lang/String;
    const-string v7, "other"

    invoke-virtual {v7, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-nez v7, :cond_0

    .line 543
    const-string v7, "failnet"

    invoke-static {p2}, Lcom/netease/newsreader/util/Tools;->getNetworkType(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v8

    invoke-static {p2, v7, v8}, Lcom/netease/mobileanalysis/MobileAgent;->setEvent(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_1
.end method

.method public static getResponseFromPostUrl(Ljava/util/List;Ljava/lang/String;Landroid/content/Context;)Ljava/lang/String;
    .locals 9
    .parameter
    .parameter "url"
    .parameter "mContext"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Lorg/apache/http/NameValuePair;",
            ">;",
            "Ljava/lang/String;",
            "Landroid/content/Context;",
            ")",
            "Ljava/lang/String;"
        }
    .end annotation

    .prologue
    .line 380
    .local p0, params:Ljava/util/List;,"Ljava/util/List<Lorg/apache/http/NameValuePair;>;"
    const-string v5, ""

    .line 381
    .local v5, result:Ljava/lang/String;
    new-instance v1, Lorg/apache/http/client/methods/HttpPost;

    invoke-direct {v1, p1}, Lorg/apache/http/client/methods/HttpPost;-><init>(Ljava/lang/String;)V

    .line 382
    .local v1, httpRequest:Lorg/apache/http/client/methods/HttpPost;
    const-string v6, "referer"

    const-string v7, "http://www.163.com"

    invoke-virtual {v1, v6, v7}, Lorg/apache/http/client/methods/HttpPost;->setHeader(Ljava/lang/String;Ljava/lang/String;)V

    .line 383
    new-instance v2, Lorg/apache/http/impl/client/DefaultHttpClient;

    invoke-direct {v2}, Lorg/apache/http/impl/client/DefaultHttpClient;-><init>()V

    .line 384
    .local v2, httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    invoke-static {p2}, Lcom/netease/newsreader/util/Tools;->isCMWAPMobileNet(Landroid/content/Context;)Z

    move-result v6

    if-eqz v6, :cond_0

    .line 385
    new-instance v3, Lorg/apache/http/HttpHost;

    const-string v6, "10.0.0.172"

    const/16 v7, 0x50

    const-string v8, "http"

    invoke-direct {v3, v6, v7, v8}, Lorg/apache/http/HttpHost;-><init>(Ljava/lang/String;ILjava/lang/String;)V

    .line 386
    .local v3, proxy:Lorg/apache/http/HttpHost;
    invoke-virtual {v2}, Lorg/apache/http/impl/client/DefaultHttpClient;->getParams()Lorg/apache/http/params/HttpParams;

    move-result-object v6

    const-string v7, "http.route.default-proxy"

    invoke-interface {v6, v7, v3}, Lorg/apache/http/params/HttpParams;->setParameter(Ljava/lang/String;Ljava/lang/Object;)Lorg/apache/http/params/HttpParams;

    .line 388
    .end local v3           #proxy:Lorg/apache/http/HttpHost;
    :cond_0
    if-nez p0, :cond_1

    .line 389
    new-instance p0, Ljava/util/ArrayList;

    .end local p0           #params:Ljava/util/List;,"Ljava/util/List<Lorg/apache/http/NameValuePair;>;"
    invoke-direct {p0}, Ljava/util/ArrayList;-><init>()V

    .line 392
    .restart local p0       #params:Ljava/util/List;,"Ljava/util/List<Lorg/apache/http/NameValuePair;>;"
    :cond_1
    :try_start_0
    new-instance v6, Lorg/apache/http/client/entity/UrlEncodedFormEntity;

    const-string v7, "UTF-8"

    invoke-direct {v6, p0, v7}, Lorg/apache/http/client/entity/UrlEncodedFormEntity;-><init>(Ljava/util/List;Ljava/lang/String;)V

    invoke-virtual {v1, v6}, Lorg/apache/http/client/methods/HttpPost;->setEntity(Lorg/apache/http/HttpEntity;)V

    .line 393
    invoke-virtual {v1}, Lorg/apache/http/client/methods/HttpPost;->getParams()Lorg/apache/http/params/HttpParams;

    move-result-object v6

    const-string v7, "http.protocol.expect-continue"

    const/4 v8, 0x0

    invoke-interface {v6, v7, v8}, Lorg/apache/http/params/HttpParams;->setBooleanParameter(Ljava/lang/String;Z)Lorg/apache/http/params/HttpParams;

    .line 394
    invoke-virtual {v2, v1}, Lorg/apache/http/impl/client/DefaultHttpClient;->execute(Lorg/apache/http/client/methods/HttpUriRequest;)Lorg/apache/http/HttpResponse;

    move-result-object v4

    .line 395
    .local v4, response:Lorg/apache/http/HttpResponse;
    invoke-interface {v4}, Lorg/apache/http/HttpResponse;->getStatusLine()Lorg/apache/http/StatusLine;

    move-result-object v6

    invoke-interface {v6}, Lorg/apache/http/StatusLine;->getStatusCode()I

    move-result v6

    const/16 v7, 0xc8

    if-ne v6, v7, :cond_2

    .line 396
    invoke-interface {v4}, Lorg/apache/http/HttpResponse;->getEntity()Lorg/apache/http/HttpEntity;

    move-result-object v6

    invoke-static {v6}, Lorg/apache/http/util/EntityUtils;->toString(Lorg/apache/http/HttpEntity;)Ljava/lang/String;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v5

    .line 401
    :cond_2
    invoke-virtual {v2}, Lorg/apache/http/impl/client/DefaultHttpClient;->getConnectionManager()Lorg/apache/http/conn/ClientConnectionManager;

    move-result-object v6

    invoke-interface {v6}, Lorg/apache/http/conn/ClientConnectionManager;->shutdown()V

    .line 403
    .end local v4           #response:Lorg/apache/http/HttpResponse;
    :goto_0
    return-object v5

    .line 398
    :catch_0
    move-exception v0

    .line 399
    .local v0, e:Ljava/lang/Exception;
    :try_start_1
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 401
    invoke-virtual {v2}, Lorg/apache/http/impl/client/DefaultHttpClient;->getConnectionManager()Lorg/apache/http/conn/ClientConnectionManager;

    move-result-object v6

    invoke-interface {v6}, Lorg/apache/http/conn/ClientConnectionManager;->shutdown()V

    goto :goto_0

    .line 400
    .end local v0           #e:Ljava/lang/Exception;
    :catchall_0
    move-exception v6

    .line 401
    invoke-virtual {v2}, Lorg/apache/http/impl/client/DefaultHttpClient;->getConnectionManager()Lorg/apache/http/conn/ClientConnectionManager;

    move-result-object v7

    invoke-interface {v7}, Lorg/apache/http/conn/ClientConnectionManager;->shutdown()V

    .line 402
    throw v6
.end method

.method public static getResponseFromPostUrlForPUSH(Ljava/util/List;Ljava/lang/String;Landroid/content/Context;)Ljava/lang/String;
    .locals 10
    .parameter
    .parameter "url"
    .parameter "mContext"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Lorg/apache/http/NameValuePair;",
            ">;",
            "Ljava/lang/String;",
            "Landroid/content/Context;",
            ")",
            "Ljava/lang/String;"
        }
    .end annotation

    .prologue
    .line 407
    .local p0, params:Ljava/util/List;,"Ljava/util/List<Lorg/apache/http/NameValuePair;>;"
    const-string v6, ""

    .line 409
    .local v6, result:Ljava/lang/String;
    new-instance v1, Lorg/apache/http/params/BasicHttpParams;

    invoke-direct {v1}, Lorg/apache/http/params/BasicHttpParams;-><init>()V

    .line 410
    .local v1, httpParameters:Lorg/apache/http/params/HttpParams;
    const-string v7, "NTES Android"

    invoke-static {v1, v7}, Lorg/apache/http/params/HttpProtocolParams;->setUserAgent(Lorg/apache/http/params/HttpParams;Ljava/lang/String;)V

    .line 411
    new-instance v2, Lorg/apache/http/impl/client/DefaultHttpClient;

    invoke-direct {v2, v1}, Lorg/apache/http/impl/client/DefaultHttpClient;-><init>(Lorg/apache/http/params/HttpParams;)V

    .line 412
    .local v2, httpclient:Lorg/apache/http/impl/client/DefaultHttpClient;
    invoke-static {p2}, Lcom/netease/newsreader/util/Tools;->isCMWAPMobileNet(Landroid/content/Context;)Z

    move-result v7

    if-eqz v7, :cond_0

    .line 413
    new-instance v3, Lorg/apache/http/HttpHost;

    const-string v7, "10.0.0.172"

    const/16 v8, 0x50

    const-string v9, "http"

    invoke-direct {v3, v7, v8, v9}, Lorg/apache/http/HttpHost;-><init>(Ljava/lang/String;ILjava/lang/String;)V

    .line 414
    .local v3, proxy:Lorg/apache/http/HttpHost;
    invoke-virtual {v2}, Lorg/apache/http/impl/client/DefaultHttpClient;->getParams()Lorg/apache/http/params/HttpParams;

    move-result-object v7

    const-string v8, "http.route.default-proxy"

    invoke-interface {v7, v8, v3}, Lorg/apache/http/params/HttpParams;->setParameter(Ljava/lang/String;Ljava/lang/Object;)Lorg/apache/http/params/HttpParams;

    .line 417
    .end local v3           #proxy:Lorg/apache/http/HttpHost;
    :cond_0
    :try_start_0
    new-instance v4, Lorg/apache/http/client/methods/HttpPost;

    invoke-direct {v4, p1}, Lorg/apache/http/client/methods/HttpPost;-><init>(Ljava/lang/String;)V

    .line 418
    .local v4, request:Lorg/apache/http/client/methods/HttpPost;
    if-eqz p0, :cond_1

    new-instance v7, Lorg/apache/http/client/entity/UrlEncodedFormEntity;

    const-string v8, "UTF-8"

    invoke-direct {v7, p0, v8}, Lorg/apache/http/client/entity/UrlEncodedFormEntity;-><init>(Ljava/util/List;Ljava/lang/String;)V

    invoke-virtual {v4, v7}, Lorg/apache/http/client/methods/HttpPost;->setEntity(Lorg/apache/http/HttpEntity;)V

    .line 419
    :cond_1
    invoke-virtual {v2, v4}, Lorg/apache/http/impl/client/DefaultHttpClient;->execute(Lorg/apache/http/client/methods/HttpUriRequest;)Lorg/apache/http/HttpResponse;

    move-result-object v5

    .line 420
    .local v5, response:Lorg/apache/http/HttpResponse;
    invoke-interface {v5}, Lorg/apache/http/HttpResponse;->getStatusLine()Lorg/apache/http/StatusLine;

    move-result-object v7

    invoke-interface {v7}, Lorg/apache/http/StatusLine;->getStatusCode()I

    move-result v7

    const/16 v8, 0xc8

    if-ne v7, v8, :cond_2

    .line 421
    invoke-interface {v5}, Lorg/apache/http/HttpResponse;->getEntity()Lorg/apache/http/HttpEntity;

    move-result-object v7

    invoke-static {v7}, Lorg/apache/http/util/EntityUtils;->toString(Lorg/apache/http/HttpEntity;)Ljava/lang/String;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v6

    .line 426
    :cond_2
    invoke-virtual {v2}, Lorg/apache/http/impl/client/DefaultHttpClient;->getConnectionManager()Lorg/apache/http/conn/ClientConnectionManager;

    move-result-object v7

    invoke-interface {v7}, Lorg/apache/http/conn/ClientConnectionManager;->shutdown()V

    .line 428
    .end local v4           #request:Lorg/apache/http/client/methods/HttpPost;
    .end local v5           #response:Lorg/apache/http/HttpResponse;
    :goto_0
    return-object v6

    .line 423
    :catch_0
    move-exception v0

    .line 424
    .local v0, e:Ljava/lang/Exception;
    :try_start_1
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 426
    invoke-virtual {v2}, Lorg/apache/http/impl/client/DefaultHttpClient;->getConnectionManager()Lorg/apache/http/conn/ClientConnectionManager;

    move-result-object v7

    invoke-interface {v7}, Lorg/apache/http/conn/ClientConnectionManager;->shutdown()V

    goto :goto_0

    .line 425
    .end local v0           #e:Ljava/lang/Exception;
    :catchall_0
    move-exception v7

    .line 426
    invoke-virtual {v2}, Lorg/apache/http/impl/client/DefaultHttpClient;->getConnectionManager()Lorg/apache/http/conn/ClientConnectionManager;

    move-result-object v8

    invoke-interface {v8}, Lorg/apache/http/conn/ClientConnectionManager;->shutdown()V

    .line 427
    throw v7
.end method

.method public static post(Ljava/lang/String;Ljava/util/Map;[Lcom/netease/newsreader/util/FormFile;Ljava/lang/String;)Ljava/lang/String;
    .locals 25
    .parameter "actionUrl"
    .parameter
    .parameter "files"
    .parameter "cookie"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;[",
            "Lcom/netease/newsreader/util/FormFile;",
            "Ljava/lang/String;",
            ")",
            "Ljava/lang/String;"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 143
    .local p1, params:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;"
    const-string v18, "--"

    .line 144
    .local v18, twoHyphens:Ljava/lang/String;
    const-string v3, "******"

    .line 145
    .local v3, BOUNDARY:Ljava/lang/String;
    const-string v4, "multipart/form-data"

    .line 147
    .local v4, MULTIPART_FROM_DATA:Ljava/lang/String;
    new-instance v19, Ljava/net/URL;

    move-object/from16 v0, v19

    move-object/from16 v1, p0

    invoke-direct {v0, v1}, Ljava/net/URL;-><init>(Ljava/lang/String;)V

    .line 148
    .local v19, uri:Ljava/net/URL;
    invoke-virtual/range {v19 .. v19}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;

    move-result-object v7

    check-cast v7, Ljava/net/HttpURLConnection;

    .line 149
    .local v7, conn:Ljava/net/HttpURLConnection;
    const/16 v20, 0x1388

    move/from16 v0, v20

    invoke-virtual {v7, v0}, Ljava/net/HttpURLConnection;->setReadTimeout(I)V

    .line 150
    const/16 v20, 0x1

    move/from16 v0, v20

    invoke-virtual {v7, v0}, Ljava/net/HttpURLConnection;->setDoInput(Z)V

    .line 151
    const/16 v20, 0x1

    move/from16 v0, v20

    invoke-virtual {v7, v0}, Ljava/net/HttpURLConnection;->setDoOutput(Z)V

    .line 152
    const/16 v20, 0x0

    move/from16 v0, v20

    invoke-virtual {v7, v0}, Ljava/net/HttpURLConnection;->setUseCaches(Z)V

    .line 154
    const-string v20, "POST"

    move-object/from16 v0, v20

    invoke-virtual {v7, v0}, Ljava/net/HttpURLConnection;->setRequestMethod(Ljava/lang/String;)V

    .line 155
    const-string v20, "Connection"

    const-string v21, "keep-alive"

    move-object/from16 v0, v20

    move-object/from16 v1, v21

    invoke-virtual {v7, v0, v1}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V

    .line 156
    const-string v20, "Charsert"

    const-string v21, "UTF-8"

    move-object/from16 v0, v20

    move-object/from16 v1, v21

    invoke-virtual {v7, v0, v1}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V

    .line 157
    const-string v20, "Content-Type"

    new-instance v21, Ljava/lang/StringBuilder;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v22

    invoke-direct/range {v21 .. v22}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 158
    const-string v22, "; boundary="

    invoke-virtual/range {v21 .. v22}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v21

    move-object/from16 v0, v21

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v21

    invoke-virtual/range {v21 .. v21}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v21

    .line 157
    move-object/from16 v0, v20

    move-object/from16 v1, v21

    invoke-virtual {v7, v0, v1}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V

    .line 159
    const-string v20, "Cookie"

    move-object/from16 v0, v20

    move-object/from16 v1, p3

    invoke-virtual {v7, v0, v1}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V

    .line 161
    new-instance v15, Ljava/lang/StringBuilder;

    invoke-direct {v15}, Ljava/lang/StringBuilder;-><init>()V

    .line 164
    .local v15, sb:Ljava/lang/StringBuilder;
    invoke-interface/range {p1 .. p1}, Ljava/util/Map;->entrySet()Ljava/util/Set;

    move-result-object v20

    invoke-interface/range {v20 .. v20}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v21

    :goto_0
    invoke-interface/range {v21 .. v21}, Ljava/util/Iterator;->hasNext()Z

    move-result v20

    if-nez v20, :cond_0

    .line 175
    new-instance v13, Ljava/io/DataOutputStream;

    .line 176
    invoke-virtual {v7}, Ljava/net/HttpURLConnection;->getOutputStream()Ljava/io/OutputStream;

    move-result-object v20

    .line 175
    move-object/from16 v0, v20

    invoke-direct {v13, v0}, Ljava/io/DataOutputStream;-><init>(Ljava/io/OutputStream;)V

    .line 177
    .local v13, outStream:Ljava/io/DataOutputStream;
    invoke-virtual {v15}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v20

    invoke-virtual/range {v20 .. v20}, Ljava/lang/String;->getBytes()[B

    move-result-object v20

    move-object/from16 v0, v20

    invoke-virtual {v13, v0}, Ljava/io/DataOutputStream;->write([B)V

    .line 181
    move-object/from16 v0, p2

    array-length v0, v0

    move/from16 v21, v0

    const/16 v20, 0x0

    :goto_1
    move/from16 v0, v20

    move/from16 v1, v21

    if-lt v0, v1, :cond_1

    .line 210
    new-instance v20, Ljava/lang/StringBuilder;

    invoke-static/range {v18 .. v18}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v21

    invoke-direct/range {v20 .. v21}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, v20

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v20

    move-object/from16 v0, v20

    move-object/from16 v1, v18

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v20

    const-string v21, "\r\n"

    invoke-virtual/range {v20 .. v21}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v20

    invoke-virtual/range {v20 .. v20}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v20

    .line 211
    invoke-virtual/range {v20 .. v20}, Ljava/lang/String;->getBytes()[B

    move-result-object v8

    .line 212
    .local v8, end_data:[B
    invoke-virtual {v13, v8}, Ljava/io/DataOutputStream;->write([B)V

    .line 213
    invoke-virtual {v13}, Ljava/io/DataOutputStream;->flush()V

    .line 216
    invoke-virtual {v7}, Ljava/net/HttpURLConnection;->getResponseCode()I

    move-result v14

    .line 217
    .local v14, res:I
    const/16 v20, 0xc8

    move/from16 v0, v20

    if-eq v14, v0, :cond_4

    .line 218
    new-instance v20, Ljava/lang/RuntimeException;

    const-string v21, "\u8bf7\u6c42\u5931\u8d25 "

    invoke-direct/range {v20 .. v21}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw v20

    .line 164
    .end local v8           #end_data:[B
    .end local v13           #outStream:Ljava/io/DataOutputStream;
    .end local v14           #res:I
    :cond_0
    invoke-interface/range {v21 .. v21}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Ljava/util/Map$Entry;

    .line 166
    .local v9, entry:Ljava/util/Map$Entry;,"Ljava/util/Map$Entry<Ljava/lang/String;Ljava/lang/String;>;"
    new-instance v20, Ljava/lang/StringBuilder;

    invoke-static/range {v18 .. v18}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v22

    move-object/from16 v0, v20

    move-object/from16 v1, v22

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, v20

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v20

    invoke-virtual/range {v20 .. v20}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v20

    move-object/from16 v0, v20

    invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 168
    const-string v20, "\r\n"

    move-object/from16 v0, v20

    invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 169
    new-instance v22, Ljava/lang/StringBuilder;

    const-string v20, "Content-Disposition: form-data; name=\""

    move-object/from16 v0, v22

    move-object/from16 v1, v20

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 170
    invoke-interface {v9}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;

    move-result-object v20

    check-cast v20, Ljava/lang/String;

    move-object/from16 v0, v22

    move-object/from16 v1, v20

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v20

    const-string v22, "\""

    move-object/from16 v0, v20

    move-object/from16 v1, v22

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v20

    const-string v22, "\r\n\r\n"

    move-object/from16 v0, v20

    move-object/from16 v1, v22

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v20

    invoke-virtual/range {v20 .. v20}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v20

    .line 169
    move-object/from16 v0, v20

    invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 171
    invoke-interface {v9}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v20

    check-cast v20, Ljava/lang/String;

    move-object/from16 v0, v20

    invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 172
    const-string v20, "\r\n"

    move-object/from16 v0, v20

    invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto/16 :goto_0

    .line 181
    .end local v9           #entry:Ljava/util/Map$Entry;,"Ljava/util/Map$Entry<Ljava/lang/String;Ljava/lang/String;>;"
    .restart local v13       #outStream:Ljava/io/DataOutputStream;
    :cond_1
    aget-object v10, p2, v20

    .line 183
    .local v10, file:Lcom/netease/newsreader/util/FormFile;
    new-instance v16, Ljava/lang/StringBuilder;

    invoke-direct/range {v16 .. v16}, Ljava/lang/StringBuilder;-><init>()V

    .line 185
    .local v16, sb1:Ljava/lang/StringBuilder;
    new-instance v22, Ljava/lang/StringBuilder;

    invoke-static/range {v18 .. v18}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v23

    invoke-direct/range {v22 .. v23}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, v22

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v22

    invoke-virtual/range {v22 .. v22}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v22

    move-object/from16 v0, v16

    move-object/from16 v1, v22

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 186
    const-string v22, "\r\n"

    move-object/from16 v0, v16

    move-object/from16 v1, v22

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 188
    new-instance v22, Ljava/lang/StringBuilder;

    const-string v23, "Content-Disposition: form-data; name=\""

    invoke-direct/range {v22 .. v23}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 189
    invoke-virtual {v10}, Lcom/netease/newsreader/util/FormFile;->getFormnames()Ljava/lang/String;

    move-result-object v23

    invoke-virtual/range {v22 .. v23}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v22

    const-string v23, "\"; filename=\""

    invoke-virtual/range {v22 .. v23}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v22

    .line 190
    invoke-virtual {v10}, Lcom/netease/newsreader/util/FormFile;->getFileName()Ljava/lang/String;

    move-result-object v23

    invoke-virtual/range {v22 .. v23}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v22

    const-string v23, "\""

    invoke-virtual/range {v22 .. v23}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v22

    const-string v23, "\r\n"

    invoke-virtual/range {v22 .. v23}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v22

    invoke-virtual/range {v22 .. v22}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v22

    .line 188
    move-object/from16 v0, v16

    move-object/from16 v1, v22

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 191
    new-instance v22, Ljava/lang/StringBuilder;

    const-string v23, "Content-Type: "

    invoke-direct/range {v22 .. v23}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v10}, Lcom/netease/newsreader/util/FormFile;->getContentType()Ljava/lang/String;

    move-result-object v23

    invoke-virtual/range {v22 .. v23}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v22

    const-string v23, "\r\n\r\n"

    invoke-virtual/range {v22 .. v23}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v22

    invoke-virtual/range {v22 .. v22}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v22

    move-object/from16 v0, v16

    move-object/from16 v1, v22

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 192
    invoke-virtual/range {v16 .. v16}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v22

    invoke-virtual/range {v22 .. v22}, Ljava/lang/String;->getBytes()[B

    move-result-object v22

    move-object/from16 v0, v22

    invoke-virtual {v13, v0}, Ljava/io/DataOutputStream;->write([B)V

    .line 195
    invoke-virtual {v10}, Lcom/netease/newsreader/util/FormFile;->getInStream()Ljava/io/InputStream;

    move-result-object v22

    if-eqz v22, :cond_3

    .line 197
    const/16 v22, 0x400

    move/from16 v0, v22

    new-array v5, v0, [B

    .line 198
    .local v5, buffer:[B
    const/4 v12, 0x0

    .line 199
    .local v12, len:I
    :goto_2
    invoke-virtual {v10}, Lcom/netease/newsreader/util/FormFile;->getInStream()Ljava/io/InputStream;

    move-result-object v22

    move-object/from16 v0, v22

    invoke-virtual {v0, v5}, Ljava/io/InputStream;->read([B)I

    move-result v12

    const/16 v22, -0x1

    move/from16 v0, v22

    if-ne v12, v0, :cond_2

    .line 202
    invoke-virtual {v10}, Lcom/netease/newsreader/util/FormFile;->getInStream()Ljava/io/InputStream;

    move-result-object v22

    invoke-virtual/range {v22 .. v22}, Ljava/io/InputStream;->close()V

    .line 207
    .end local v5           #buffer:[B
    .end local v12           #len:I
    :goto_3
    const-string v22, "\r\n"

    invoke-virtual/range {v22 .. v22}, Ljava/lang/String;->getBytes()[B

    move-result-object v22

    move-object/from16 v0, v22

    invoke-virtual {v13, v0}, Ljava/io/DataOutputStream;->write([B)V

    .line 181
    add-int/lit8 v20, v20, 0x1

    goto/16 :goto_1

    .line 200
    .restart local v5       #buffer:[B
    .restart local v12       #len:I
    :cond_2
    const/16 v22, 0x0

    move/from16 v0, v22

    invoke-virtual {v13, v5, v0, v12}, Ljava/io/DataOutputStream;->write([BII)V

    goto :goto_2

    .line 204
    .end local v5           #buffer:[B
    .end local v12           #len:I
    :cond_3
    invoke-virtual {v10}, Lcom/netease/newsreader/util/FormFile;->getData()[B

    move-result-object v22

    const/16 v23, 0x0

    invoke-virtual {v10}, Lcom/netease/newsreader/util/FormFile;->getData()[B

    move-result-object v24

    move-object/from16 v0, v24

    array-length v0, v0

    move/from16 v24, v0

    move-object/from16 v0, v22

    move/from16 v1, v23

    move/from16 v2, v24

    invoke-virtual {v13, v0, v1, v2}, Ljava/io/DataOutputStream;->write([BII)V

    goto :goto_3

    .line 219
    .end local v10           #file:Lcom/netease/newsreader/util/FormFile;
    .end local v16           #sb1:Ljava/lang/StringBuilder;
    .restart local v8       #end_data:[B
    .restart local v14       #res:I
    :cond_4
    invoke-virtual {v7}, Ljava/net/HttpURLConnection;->getInputStream()Ljava/io/InputStream;

    move-result-object v11

    .line 221
    .local v11, in:Ljava/io/InputStream;
    new-instance v17, Ljava/lang/StringBuilder;

    invoke-direct/range {v17 .. v17}, Ljava/lang/StringBuilder;-><init>()V

    .line 222
    .local v17, sb2:Ljava/lang/StringBuilder;
    :goto_4
    invoke-virtual {v11}, Ljava/io/InputStream;->read()I

    move-result v6

    .local v6, ch:I
    const/16 v20, -0x1

    move/from16 v0, v20

    if-ne v6, v0, :cond_5

    .line 225
    invoke-virtual {v13}, Ljava/io/DataOutputStream;->close()V

    .line 226
    invoke-virtual {v7}, Ljava/net/HttpURLConnection;->disconnect()V

    .line 227
    invoke-virtual/range {v17 .. v17}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v20

    return-object v20

    .line 223
    :cond_5
    int-to-char v0, v6

    move/from16 v20, v0

    move-object/from16 v0, v17

    move/from16 v1, v20

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    goto :goto_4
.end method
